entry: Simplify progress size allocation
authorTimm Bäder <mail@baedert.org>
Wed, 28 Jun 2017 05:25:23 +0000 (07:25 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:15 +0000 (21:27 -0400)
gtk/gtkentry.c

index a40c6d29eda8c5691c654818d38755a5b5d2a44b..d0512711b1b1981eff2db04a3bd23af3c3d02ee2 100644 (file)
@@ -3107,7 +3107,7 @@ gtk_entry_size_allocate (GtkWidget     *widget,
   GtkEntry *entry = GTK_ENTRY (widget);
   GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
   GdkRectangle clip = *allocation;
-  GtkAllocation child_clip = *allocation;
+  GtkAllocation child_clip;
   gint i;
 
   priv->text_baseline = -1;
@@ -3157,18 +3157,11 @@ gtk_entry_size_allocate (GtkWidget     *widget,
 
   if (priv->progress_widget && gtk_widget_get_visible (priv->progress_widget))
     {
-      int req_width;
       GtkAllocation progress_alloc;
 
-      gtk_widget_measure (priv->progress_widget,
-                          GTK_ORIENTATION_HORIZONTAL,
-                          allocation->height,
-                          &req_width, NULL,
-                          NULL, NULL);
-
       progress_alloc.x = 0;
       progress_alloc.y = 0;
-      progress_alloc.width = MAX (allocation->width, req_width);
+      progress_alloc.width = allocation->width;
       progress_alloc.height = allocation->height;
 
       gtk_widget_size_allocate (priv->progress_widget, &progress_alloc);